<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
		<meta charset="utf-8">
		<title>淘天机站群系统管理后台</title>
		<!-- include header_meta -->
		<script>
			
			$(function() {
				$(".cp-table .weight").dblclick(function() {
					var editObj = $(this).find("input");
					editObj.show();
					editObj.select();
					editObj.next('span').hide();
				});

				$(".cp-table .weight input").blur(function() {
					var varIpt = $(this);
					var valBox = varIpt.next('span');
					var value = parseInt(varIpt.val());
					var id = $(this).attr("data-id");
					var oldvalue = parseInt(valBox.text());
					if (value!=oldvalue) {
						$.get("?m=classlist&a=weight&id="+id+"&weight="+value,function() {
							valBox.text(value);
							varIpt.hide();
							valBox.show();
						})
						
					} else {
						varIpt.hide();
						valBox.show();
					}
					
				});
			})
		</script>
</head>
<body>
	<!-- include header -->
	<div class="cp-wrap {if $jnarrow}jnarrow{/if}">
		<div class="crumb"></div>
		<!-- if $currentYumingId -->
		<div class="cp-table-top">
			<input type="button" value="新建栏目" class="btn" onclick="location.href='?m=classlist&a=add'" />
		</div>
		<!-- /if -->
		<div class="cp-table">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tbody>
					<tr>
						<th width="15" align="left"></th>
						<th align="left">栏目标记</th>
						<th align="left">栏目名称</th>
						<th align="left">所在站点</th>
						<th align="left">排序</th>
						<th align="left">状态</th>
						<th width="200" align="center">操作</th>
					</tr>
					<!-- if $list -->
					<!-- foreach $list -->
					<!-- if $status==1 -->
					<tr>
						<td align="left" width="10"></td>
						<td align="left" width="150"> {$ename}</td>
						<td align="left" width="150"> {$title}</td>
						<td align="left" width="250"> {$currentYuming['name']}</td>
						<td><div class="weight"><input type="text" data-id="{$id}" value="{$weight}" size="5" style=" width:60px; text-align: center; display: none;"><span>{$weight}</span></div></td>
						<td width="50">
							<font color="green">正常</font>
						</td>
						<td align="center" width="200">
							<a href="?m=classlist&a=stop&id={$id}&yuming_id={$currentYumingId}" onclick="return confirm('确定禁用吗？')"><font color="red" title="禁用会清空该栏目相关的文章">禁用</font></a>
							<!-- if $ifsys!=1 -->
							|
							<a href="?m=classlist&a=edit&id={$id}&yuming_id={$currentYumingId}">编辑</a>
							|
							<a href="?m=classlist&a=del&id={$id}&yuming_id={$currentYumingId}" onclick="return confirm('删除后将清除栏目下所有文章，确定吗?')">删除</a>
							<!-- /if -->
						</td>
					</tr>
					<!-- /if -->
					<!-- /foreach -->
					<!-- /if -->

					<!-- if $list -->
					<!-- foreach $list -->
					<!-- if $status!=1 -->
					<tr class="disable">
						<td align="left" width="10"></td>
						<td align="left" width="100">{$ename}</td>
						<td align="left" width="150">{$title}</td>
						<td align="left" width="250">{$currentYuming['name']}</td>
						<td>{$weight}</td>
						<td width="50">
							已禁用
						</td>
						<td align="center" width="200">
							<a href="?m=classlist&a=open&id={$id}&yuming_id={$currentYumingId}">启用</a>
						</td>
					</tr>
					<!-- /if -->
					<!-- /foreach -->
					<!-- /if -->
				</tbody>
			</table>
		</div>
		<!-- if empty($list) -->
		<div class="noresult"><font color="red">请选择要显示的站点域名</font></div>
		<!-- /if -->
		<div class="cp-pages">
		</div>
	</div>
	<!-- include footer -->
	<script>
	</script>
</body>
</html>